#include <iostream>
#include <string>
#include <memory>
#include "HttpServer.hpp"

void Usage(std::string str)
{
  std::cout<<"Usage:\n\t"<<str<<" port"<<std::endl;
  exit(1);
}

int main(int argc,char* argv[])
{
  if(argc!=2)
  {
    Usage(argv[0]);
  }

  int port=atoi(argv[1]);

  std::shared_ptr<HttpServer> http_server(new HttpServer(port));

  http_server->InitServer();
  http_server->Loop();

  return 0;
}
